<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=GB2312">
<title>HTML 2 (F)PDF Project</title>
<meta content="someone" name="author">
<meta oq="ehisso?" name="description" content="something">
</head>

<body>

<div id="print_tab" style="width:300px">
<table border="1"  cellspacing="1" cellpadding="0" width="100%">
<tr>
<th width="15%">title1</th>
<th width="40%">title2</th>
</tr>
<tr>
<td>just for test</td>
<td>测试之用</td>
</tr>
<tr>
<td>5.032</td>
<td>6.00</td>
</tr>
</table>
</div>

<a href="#" onclick="return out();">click for test</a>
<a href="testpdf.php">print</a>
</body></html>

<script type="text/javascript">
function out(){
var ret = document.getElementById("print_tab");
var data = ret.innerHTML;

var url = "testpdf.php?data="+data;
window.location = url;

//alert(data);
return false;
}
</script>